This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
OK, I'm using a Java agent to loop through and convert an number of Base64 strings to the images they represent. I'm having trouble setting the headerVal. Below is the block of code. Logging shows I'm getting the body as it is already a MIMEEntity, but even thought I create the header, (twice) it's not their either time - so both lines where I say the header is null print. I finally get a null pointer exception on the header.setHeaderVal("image/png") line. Can someone please tell me what I'm missing here?
Cheers,
Brian
MIMEEntity body;
if(doc.hasItem("body")){
System.out.println("has MIME body");
body = doc.getMIMEEntity("body");
} else {
System.out.println("before create MIME body");
body = doc.createMIMEEntity();
}
if(body == null){
body = doc.createMIMEEntity();
System.out.println("body was null");
}
System.out.println("after body item");
allObjects.addElement(body);
if (body == null){
System.out.println("hmm, body is null");
}